]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/widget: Emit "style-changed" on all theme changes
authorJonas Dreßler <verdre@v0yd.nl>
Sun, 17 Nov 2019 23:44:36 +0000 (00:44 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 14 Feb 2022 13:50:03 +0000 (13:50 +0000)
Since now the resource consumption of the "style-changed" signal
handlers should be significantly lower, we can start emitting the signal
in all cases again as it was originally intended. This fixes some small
visual issues, like the battery percentage in the panel only being shown
on hover or updating the size of StIcons on scale-factor changes.

This effectively reverts f74c07b9acbdc6945ca37f86bc680701f048f174

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1708

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2099>

src/st/st-widget.c

index 69bf86c5d94f06e65d7eb1f2312649d13e851081..e131a5108a1b019a2b1c384d9113175d2a2b8ab3 100644 (file)
@@ -1740,29 +1740,7 @@ st_widget_recompute_style (StWidget    *widget,
         st_theme_node_paint_state_invalidate (current_paint_state (widget));
     }
 
-  /* It is very likely that custom CSS properties are used with StDrawingArea
-     to control the custom drawing, so never omit the ::style-changed signal */
-  if (paint_equal)
-    paint_equal = !ST_IS_DRAWING_AREA (widget);
-
-  if (paint_equal && old_theme_node->font_desc != NULL)
-    paint_equal = pango_font_description_equal (old_theme_node->font_desc,
-                                                st_theme_node_get_font (new_theme_node));
-
-  if (paint_equal && old_theme_node->foreground_computed)
-    {
-      ClutterColor col;
-
-      st_theme_node_get_foreground_color (new_theme_node, &col);
-      paint_equal = clutter_color_equal (&old_theme_node->foreground_color, &col);
-    }
-
-  if (paint_equal && old_theme_node->icon_colors)
-    paint_equal = st_icon_colors_equal (old_theme_node->icon_colors,
-                                        st_theme_node_get_icon_colors (new_theme_node));
-
-  if (!paint_equal || !geometry_equal)
-    g_signal_emit (widget, signals[STYLE_CHANGED], 0);
+  g_signal_emit (widget, signals[STYLE_CHANGED], 0);
 
   priv->is_style_dirty = FALSE;
 }